package com.jiuqi.abc.model.service;

import com.jiuqi.abc.model.bean.DriverItemFormula;
import com.jiuqi.abc.model.dao.ABCDriverItemFormulaDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 动因项公式信息service
 *
 * @author 龚泽楷
 * @date 2023年04月23日 13:45
 */
@Service
public class ABCDriverItemFormulaService {
    @Autowired
    private ABCDriverItemFormulaDao abcDriverItemFormulaDao;

    /**
     * 批量新增 动因公式信息
     *
     * @param driverItemFormulas 动因公式信息
     */
    public void batchAddDriverItemFormula(List<DriverItemFormula> driverItemFormulas) {
        abcDriverItemFormulaDao.batchAddDriverItemFormula(driverItemFormulas);
    }

    /**
     * 根据 动因项ID集合 批量获取 动因公式集合
     * @param driverItemIdList 动因项ID集合
     * @return 动因公式集合
     */
    public List<DriverItemFormula> batchGetDriverItemFormulaByDriverItemIdList(List<String> driverItemIdList) {
        return abcDriverItemFormulaDao.batchGetDriverItemFormulaByDriverItemIdList(driverItemIdList);
    }


    /**
     * 根据 动因项ID集合 批量删除 动因项公式
     *
     * @param driverItemIdList 所属动因项ID集合
     */
    public void batchDeleteDriverItemFormula(List<String> driverItemIdList) {
        abcDriverItemFormulaDao.batchDeleteDriverItemFormula(driverItemIdList);
    }
}
